Defines a constrained least-squares solver using Powell's trust region method. The method seeks a correction that reduces the residual vector while remaining inside a trust region of size and the bounds . The trial step is formed from a Gauss-Newton step a steepest-descent step and a dogleg combination with chosen so that . If the trust-region step is rejected, a backtracking line search is used to improve the step acceptance.
Applies the limits to the solution vector.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_equation_solver), | intent(in) | :: | this |
The constrained_equation_solver object. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
On input, the solution vector. On output, the clamped solution vector. |
Gets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Gets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Gets the array of lower bounds constraints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_equation_solver), | intent(in) | :: | this |
The constrained_equation_solver object. |
The limit array.
Gets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The maximum number of function evaluations.
Gets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
True if the iteration status should be printed; else, false.
Gets the initial line-search step size scaling factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_least_squares_solver), | intent(in) | :: | this |
The constrained_least_squares_solver object. |
The scaling factor.
Gets the initial trust-region radius.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_least_squares_solver), | intent(in) | :: | this |
The constrained_least_squares_solver object. |
The trust-region radius.
Gets the array of upper bounds constraints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_equation_solver), | intent(in) | :: | this |
The constrained_equation_solver object. |
The limit array.
Gets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(in) | :: | this |
The equation_solver object. |
The tolerance value.
Sets the convergence on function value tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the convergence on slope of the gradient vector tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Sets the array of lower bounds constraints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_equation_solver), | intent(inout) | :: | this |
The constrained_equation_solver object. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The limit array. |
Sets the maximum number of function evaluations allowed during a single solve.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| integer(kind=int32), | intent(in) | :: | n |
The maximum number of function evaluations. |
Sets a logical value determining if iteration status should be printed.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| logical, | intent(in) | :: | x |
True if the iteration status should be printed; else, false. |
Gets the initial line-search step size scaling factor.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_least_squares_solver), | intent(inout) | :: | this |
The constrained_least_squares_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The scaling factor. |
Sets the initial trust region radius.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_least_squares_solver), | intent(inout) | :: | this |
The constrained_least_squares_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The The trust-region radius. |
Sets the array of upper bounds constraints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_equation_solver), | intent(inout) | :: | this |
The constrained_equation_solver object. |
||
| real(kind=real64), | intent(in), | dimension(:) | :: | x |
The limit array. |
Sets the convergence on change in variable tolerance.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(equation_solver), | intent(inout) | :: | this |
The equation_solver object. |
||
| real(kind=real64), | intent(in) | :: | x |
The tolerance value. |
Applies the constrained least-squares solver to solve the nonlinear least-squares problem.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(constrained_least_squares_solver), | intent(inout) | :: | this |
The constrained_least_squares_solver object. |
||
| class(vecfcn_helper), | intent(in) | :: | fcn |
The vecfcn_helper object containing the equations to solve. |
||
| real(kind=real64), | intent(inout), | dimension(:) | :: | x |
On input, an N-element array containing an initial estimate to the solution. On output, the updated solution estimate. N is the number of variables. |
|
| real(kind=real64), | intent(out), | dimension(:) | :: | fvec |
An M-element array that, on output, will contain the values of each equation as evaluated at the variable values given in x. |
|
| type(iteration_behavior), | optional | :: | ib |
An optional output, that if provided, allows the caller to obtain iteration performance statistics. |
||
| class(*), | intent(inout), | optional | :: | args |
An optional argument to allow the user to communicate with the routine. |